package com.team.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.team.entity.SysUsers;
import com.team.entity.Users;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UsersMapper extends BaseMapper<Users> {
    @Select("SELECT id,user_Type AS userType,account,user_name AS username,created_time AS createdTime,created_user_id as createdUserId, CASE user_type WHEN 1 THEN '系统管理员' WHEN 2 THEN '挂号员' WHEN 3 THEN '门诊医师' WHEN 4 THEN '收银员' WHEN 5 THEN '药房医师' END AS typename  FROM sys_users")
    public List<Users> getAllUsers();
}
